<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="robots" content="nofollow">
<title><?php echo $name; ?></title>
<link rel="stylesheet" href="<?php echo SITEROOTURL; ?>api/info/doc/css/main.css">
</head>

<body>
<div id="header">
	<div class="back"><a href="<?php echo SITEROOTURL.'api'; ?>">返回</a></div>
	<h1><?php echo $name; ?></h1>
	<div id="summary"><?php echo $summary; ?></div>
</div>
<div id="main">
	<div class="card">
		<h2>URL</h2>
		<p><a href="<?php echo SITEROOTURL.'api/'.$name; ?>" target="_blank"><?php echo SITEROOTURL.'api/'.$name; ?></a></p>
	</div>
	<div class="card">
		<h2>HTTP请求方式</h2>
		<p><?php echo $method; ?></p>
	</div>
	<?php if($parameter){ ?>
	<div class="card">
		<h2>请求参数</h2>
		<table>
			<thead>
				<tr>
					<th style="width:100px">参数</th>
					<th style="width:40px">必选</th>
					<th style="width:60px">类型</th>
					<th>说明</th>
				</tr>
			</thead>
			<tbody>
			<?php
				foreach($parameter as $v){
					echo '<tr>';
					echo '<td>'.$v['name'].'</td>';
					echo '<td class="tac">'.($v['ismust'] ? '√' : '').'</td>';
					echo '<td class="tac">'.$v['type'].'</td>';
					echo '<td>'.$v['summary'].'</td>';
					echo '</tr>';
				}
			?>
			</tbody>
		</table>
	</div>
	<?php } ?>
</div>
<div id="footer">
	<p>本接口由 <a href="http://1one.cn" target="_blank">杭州易网新科技</a> 提供技术支持</p>
</div>
</body>
</html>